package com.kuiandjie.service;

import java.util.List;

import com.kuiandjie.dao.EmployeeDao;
import com.kuiandjie.entity.Employee;

public class EmployeeService {
	
	private EmployeeDao empDao = new EmployeeDao();

	public Employee checkLogin(String name, String password) {
		return empDao.findByNameAndPassword(name, password);
	}
	//调用dao写入数据
	public void addEmployee(String name, String pwd) {
		
		 empDao.addEmp(name,pwd);
	}
	
	public void update(Employee em) {
		empDao.update(em);
		
	}
	public List<Employee> findAll() {
		return empDao.findAll();
	}
	public List<Employee> findAllMember(int proId) {
		return empDao.finAllMemberByProId(proId);
	}
	public void uploadHead(int id, String pic) {
		empDao.uploadHead(id,pic);
		
	}
	public Employee getEmoloyeeByName(String name) {
		return empDao.findByName(name);
	}
	
}
